import request from '../utlis/request';
<template>
  <div>
    <!-- 
       @click="$router.push({path:'/article'+item.art_id})"

       @click="$router.push({
        name:'article',
        params:{
          articleId:item.art_id
        }
      })"


     -->
    <van-cell
      :to="{ name: 'article' ,params:{
        articleId:item.art_id,
        aa:'11111',
        bb:22222
      } }"
      v-for="(item, index) in articleList"
      :key="index"
      :title="item.title"
    >
      <template slot="label">==={{item.art_id}}
        <div v-if="item.cover.images.length > 1 ? true : false">
          <img
            v-for="(item2, index) in item.cover.images"
            :key="index"
            style="width: 70px; height: 70px; margin: 10px"
            :src="item2"
            alt=""
          />
        </div>
        <div>
          <span>{{ item.aut_name }}</span>
          <span style="margin: 0 10px">{{ item.comm_count }} 评论</span>
          <span>{{ item.pubdate | format }}</span>
        </div>
      </template>

      <template slot="extra">
        <img
          v-if="item.cover.images.length == 1 ? true : false"
          style="width: 70px; height: 70px; margin: 10px"
          :src="item.cover.images[0]"
          alt=""
        />
      </template>
    </van-cell>
  </div>
</template>

<script>
export default {
  props: {
    articleList: {
      type: Array,
      default: () => {
        return [];
      }
    }
  },
  name: ""
};
</script>
<style lang="less" scoped></style>
